package com.cms.juc;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Demo {


    public void changeValue(Person person) {
        person.setName("xxx");
    }

    public static void main(String[] args) {

//        Map<String, String> map = new HashMap<>();
//
//        map.put("1", "2");
//
//        System.out.println(map);
        Demo demo = new Demo();

        Person person = new Person("abc");
        demo.changeValue(person);
        System.out.println("person name=" + person.getName());
    }


}

class Person implements Serializable {
    private String name;

    public Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
